	function datetime($field, $value)
	{
		$sql = '';
        if($value['start']) $sql .= "AND `$field`>='$value[start]' ";
        if($value['end']) $sql .= "AND `$field`<='$value[end]' ";

		if($sql) $sql = substr($sql, 3);
		return $sql;
	}
